package org.springframework.security.oauth2.common.util;

import org.springframework.util.ClassUtils;

@Deprecated
public class JsonParserFactory {

    public static JsonParser create() {
        if (ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", null)) {
            return new Jackson2JsonParser();
        }
        throw new IllegalStateException("No Jackson 2 parser found. Please add Jackson 2 to your classpath.");
    }
}
